<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ page import="org.jeecgframework.web.system.pojo.base.TSTerritory" %>
<%@ page import="org.jeecgframework.web.util.StaticValue" %>
<%@include file="/context/mytags.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>现场检测完工单</title>
    <script type="text/javascript" src="plug-in/mutiLang/zh-cn.js"></script>
    <script type="text/javascript" src="plug-in/jquery/jquery-1.8.3.js"></script>
    <script type="text/javascript" src="plug-in/jquery/jquerysession.js"></script>
    <script type="text/javascript" src="plug-in/tools/dataformat.js"></script>
    <link id="easyuiTheme" rel="stylesheet" href="plug-in/easyui/themes/default/easyui.css" type="text/css"></link>
    <link rel="stylesheet" href="plug-in/easyui/themes/icon.css" type="text/css"></link>
    <link rel="stylesheet" type="text/css" href="plug-in/accordion/css/accordion.css">
    <script type="text/javascript" src="plug-in/easyui/jquery.easyui.min.1.3.2.js"></script>
    <script type="text/javascript" src="plug-in/easyui/locale/zh-cn.js"></script>
    <script type="text/javascript" src="plug-in/tools/syUtil.js"></script>
    <script type="text/javascript" src="plug-in/easyui/extends/datagrid-scrollview.js"></script>
    <script type="text/javascript" src="plug-in/My97DatePicker/WdatePicker.js"></script>
    <link rel="stylesheet" href="plug-in/tools/css/common.css" type="text/css"></link>
    <script type="text/javascript" src="plug-in/lhgDialog/lhgdialog.min.js"></script>
    <script type="text/javascript" src="plug-in/tools/curdtools_zh-cn.js"></script>
    <script type="text/javascript" src="plug-in/tools/easyuiextend.js"></script>
    <script type="text/javascript" src="plug-in/jquery-plugs/hftable/jquery-hftable.js"></script>
    <link rel="stylesheet" href="plug-in/jquery/jquery-autocomplete/jquery.autocomplete.css" type="text/css"></link>
    <script type="text/javascript" src="plug-in/jquery/jquery-autocomplete/jquery.autocomplete.min.js"></script>
    <link rel="stylesheet" href="plug-in/uploadify/css/uploadify.css" type="text/css"/>
    <script type="text/javascript" src="plug-in/uploadify/jquery.uploadify-3.1.min.js"></script>
</head>
<script>
    var form;
    $(function () {
        $('#equipmentType').combotree({
            url: 'cbsTechologyAgreeReportController.do?getEqTypes',
            required: true
        });
    })
    $(function(){
        var cbsServiceId = $("#cbsServiceId").val();
        $("#fileUpload1").uploadify({
            buttonText : '上传文件',
            auto : true,
            progressData : 'speed',
            multi : true,
            height : 20,
            width : 60,
            overrideEvents : ['onDialogClose'],
            queueID : 'instructionfile',
            fileTypeDesc : '文件格式:',
            fileTypeExts : '*.*',
            /*fileTypeDesc : '支持格式:*.pdf',
            fileTypeExts : '*.pdf',*/ //控制可上传文件的扩展名，启用本项时需同时声明fileDesc
            fileSizeLimit : '15MB',
            swf : 'plug-in/uploadify/uploadify.swf',
            uploader :  'cbsServiceController.do?fileUploadView&cbsServiceId='+cbsServiceId+"&businessType=F1",
            onUploadStart:function (){
                lockmask(true,'请稍等,导入中...');
            },
            onUploadSuccess : function(file,data) {
                lockmask(false);
                var json = $.parseJSON(data).attributes;
                var name = json.name;
                var ins = name.lastIndexOf(".");
                var ins2 = name.length;
                var ho = name.substring(ins, ins2);
                var photoType = "完工单附件";
                var photoName = photoType + ho;
                console.log(json.id+"--"+json.name)
                var html = '<p id="'+json.id+'" style="background-color: white"><span name="finishFile" class="color-blue" id="'+json.id+'">'+photoName+'</span>&nbsp;&nbsp; ' +
                    '<span style="cursor: pointer; color: black" onclick=\'delFile("'+json.id+'")\'>[删除]</span></p>'
                $("#fileName1").prepend(html);
                $.ajax({
                    type: "post",
                    data: {"id": json.id, "name": photoName},
                    dataType: "json",
                    url: "cbsServiceReportController.do?changeName",
                    success: function (data) {
                        var b = data.success;
                    }
                })
                //tip("上传成功！");
                top.window.tip("上传成功！");
            },onFallback : function(){
                tip("您未安装FLASH控件，无法上传文件！请安装FLASH控件后再试");
            },onSelectError : function(file, errorCode, errorMsg){
                switch(errorCode) {
                    case -100:
                        tip("上传的文件数量已经超出系统限制的"+$('#instruction').uploadify('settings','queueSizeLimit')+"个文件！");
                        break;
                    case -110:
                        tip("文件 ["+file.name+"] 大小超出系统限制的"+$('#instruction').uploadify('settings','fileSizeLimit')+"大小！");
                        break;
                    case -120:
                        tip("文件 ["+file.name+"] 大小异常！");
                        break;
                    case -130:
                        tip("文件 ["+file.name+"] 类型不正确！");
                        break;
                };
            }
        });
    });
    $(function(){
        var cbsServiceId = $("#cbsServiceId").val();
        $("#fileUpload2").uploadify({
            buttonText : '上传文件',
            auto : true,
            progressData : 'speed',
            multi : true,
            height : 20,
            width : 60,
            overrideEvents : ['onDialogClose'],
            queueID : 'instructionfile',
            fileTypeDesc : '文件格式:',
            fileTypeExts : '*.*',
            /*fileTypeDesc : '支持格式:*.pdf',
            fileTypeExts : '*.pdf',*/ //控制可上传文件的扩展名，启用本项时需同时声明fileDesc
            fileSizeLimit : '15MB',
            swf : 'plug-in/uploadify/uploadify.swf',
            uploader :  'cbsServiceController.do?fileUploadView&cbsServiceId='+cbsServiceId+"&businessType=F2",
            onUploadStart:function (){
                lockmask(true,'请稍等,导入中...');
            },
            onUploadSuccess : function(file,data) {
                lockmask(false);
                var json = $.parseJSON(data).attributes;
                console.log(json.id+"--"+json.name)
                var html = '<p id="'+json.id+'" style="background-color: white"><span name="repairFile" class="color-blue" id="'+json.id+'">'+json.name+'</span>&nbsp;&nbsp; ' +
                    '<span style="cursor: pointer; color: black" onclick=\'delFile("'+json.id+'")\'>[删除]</span></p>'
                $("#fileName2").prepend(html);
                //tip("上传成功！");
                top.window.tip("上传成功！");
            },onFallback : function(){
                tip("您未安装FLASH控件，无法上传文件！请安装FLASH控件后再试");
            },onSelectError : function(file, errorCode, errorMsg){
                switch(errorCode) {
                    case -100:
                        tip("上传的文件数量已经超出系统限制的"+$('#instruction').uploadify('settings','queueSizeLimit')+"个文件！");
                        break;
                    case -110:
                        tip("文件 ["+file.name+"] 大小超出系统限制的"+$('#instruction').uploadify('settings','fileSizeLimit')+"大小！");
                        break;
                    case -120:
                        tip("文件 ["+file.name+"] 大小异常！");
                        break;
                    case -130:
                        tip("文件 ["+file.name+"] 类型不正确！");
                        break;
                };
            }
        });
    });
    $(function(){
        var cbsServiceId = $("#cbsServiceId").val();
        $("#fileUpload3").uploadify({
            buttonText : '上传文件',
            auto : true,
            progressData : 'speed',
            multi : true,
            height : 20,
            width : 60,
            overrideEvents : ['onDialogClose'],
            queueID : 'instructionfile',
            fileTypeDesc : '文件格式:',
            fileTypeExts : '*.*',
            /*fileTypeDesc : '支持格式:*.pdf',
            fileTypeExts : '*.pdf',*/ //控制可上传文件的扩展名，启用本项时需同时声明fileDesc
            fileSizeLimit : '15MB',
            swf : 'plug-in/uploadify/uploadify.swf',
            uploader :  'cbsServiceController.do?fileUploadView&cbsServiceId='+cbsServiceId+"&businessType=F3",
            onUploadStart:function (){
                lockmask(true,'请稍等,导入中...');
            },
            onUploadSuccess : function(file,data) {
                lockmask(false);
                var json = $.parseJSON(data).attributes;
                var name = json.name;
                var ins = name.lastIndexOf(".");
                var ins2 = name.length;
                var ho = name.substring(ins, ins2);
                var photoType = "整改函";
                var photoName = photoType + ho;
                console.log(json.id+"--"+json.name)
                var html = '<p id="'+json.id+'" style="background-color: white"><span name="rectificationFile" class="color-blue" id="'+json.id+'">'+photoName+'</span>&nbsp;&nbsp; ' +
                    '<span style="cursor: pointer; color: black" onclick=\'delFile("'+json.id+'")\'>[删除]</span></p>'
                $("#fileName3").prepend(html);
                $.ajax({
                    type: "post",
                    data: {"id": json.id, "name": photoName},
                    dataType: "json",
                    url: "cbsServiceReportController.do?changeName",
                    success: function (data) {
                        var b = data.success;
                    }
                })
                //tip("上传成功！");
                top.window.tip("上传成功！");
            },onFallback : function(){
                tip("您未安装FLASH控件，无法上传文件！请安装FLASH控件后再试");
            },onSelectError : function(file, errorCode, errorMsg){
                switch(errorCode) {
                    case -100:
                        tip("上传的文件数量已经超出系统限制的"+$('#instruction').uploadify('settings','queueSizeLimit')+"个文件！");
                        break;
                    case -110:
                        tip("文件 ["+file.name+"] 大小超出系统限制的"+$('#instruction').uploadify('settings','fileSizeLimit')+"大小！");
                        break;
                    case -120:
                        tip("文件 ["+file.name+"] 大小异常！");
                        break;
                    case -130:
                        tip("文件 ["+file.name+"] 类型不正确！");
                        break;
                };
            }
        });
    });
    $(function(){
        var cbsServiceId = $("#cbsServiceId").val();
        $("#fileUpload4").uploadify({
            buttonText : '上传文件',
            auto : true,
            progressData : 'speed',
            multi : true,
            height : 20,
            width : 60,
            overrideEvents : ['onDialogClose'],
            queueID : 'instructionfile',
            fileTypeDesc : '文件格式:',
            fileTypeExts : '*.*',
            /*fileTypeDesc : '支持格式:*.pdf',
            fileTypeExts : '*.pdf',*/ //控制可上传文件的扩展名，启用本项时需同时声明fileDesc
            fileSizeLimit : '15MB',
            swf : 'plug-in/uploadify/uploadify.swf',
            uploader :  'cbsServiceController.do?fileUploadView&cbsServiceId='+cbsServiceId+"&businessType=F4",
            onUploadStart:function (){
                lockmask(true,'请稍等,导入中...');
            },
            onUploadSuccess : function(file,data) {
                lockmask(false);
                var photoType=$("#photoType").val();
                var json = $.parseJSON(data).attributes;
                console.log(json.id+"--"+json.name)
                var fileDir = json.name;
                var suffix = fileDir.substr(fileDir.lastIndexOf("."));
                var html = '<div style="width: 200px;display: inline-block"><p id="'+json.id+'" style="background-color: white"><span name="photoFile" class="color-blue" id="'+json.id+'">'+photoType+suffix+'</span>&nbsp;&nbsp; ' +
                    '<span style="cursor: pointer; color: black" onclick=\'delFile("'+json.id+'")\'>[删除]</span></p></div>'
                $("#fileName4").prepend(html);
                photoType+=suffix;
                $.ajax({
                    type:"post",
                    data:{"id":json.id,"name":photoType},
                    dataType:"json",
                    url:"cbsServiceReportController.do?changeName",
                    success:function (data) {
                        var b = data.success;
                    }
                })
                //tip("上传成功！");
                top.window.tip("上传成功！");
            },onFallback : function(){
                tip("您未安装FLASH控件，无法上传文件！请安装FLASH控件后再试");
            },onSelectError : function(file, errorCode, errorMsg){
                switch(errorCode) {
                    case -100:
                        tip("上传的文件数量已经超出系统限制的"+$('#instruction').uploadify('settings','queueSizeLimit')+"个文件！");
                        break;
                    case -110:
                        tip("文件 ["+file.name+"] 大小超出系统限制的"+$('#instruction').uploadify('settings','fileSizeLimit')+"大小！");
                        break;
                    case -120:
                        tip("文件 ["+file.name+"] 大小异常！");
                        break;
                    case -130:
                        tip("文件 ["+file.name+"] 类型不正确！");
                        break;
                };
            }
        });
    });
    $(function () {
        var photoType=$("#photoType").val();
        if($("[name='photoFile']").length>0){
            $("[name='photoFile']").html(photoType);
        }
        var province = $("#sheng").val();
        $.ajax({
            type:"post",
            dataType:"json",
            data:{"province":province},
            url:"cbsServiceReportController.do?getCityByCode",
            success:function (data) {
                var obj = data.obj;
                var html = " <option>--请选择--</option>";
                for (i in obj){
                    html+="<option value='"+obj[i].territoryCode+"'>"+obj[i].territoryName+"</option>";
                }
            }
        })
    })
    function getCity() {
        var province = $("#sheng").val();
        $.ajax({
            type:"post",
            dataType:"json",
            data:{"province":province},
            url:"cbsServiceReportController.do?getCityByCode",
            success:function (data) {
                var obj = data.obj;
                var html = " <option>--请选择--</option>";
                for (i in obj){
                    html+="<option value='"+obj[i].territoryCode+"'>"+obj[i].territoryName+"</option>";
                }
                $("#shi").html(html);
            }
        })
    }
    function delFile(id){
        var flag = true;
        $.ajax({
            url : "cbsServiceController.do?delFile",
            data : {
                "id" : id
            },
            cache : false,
            dataType : 'json',
            type : 'POST',
            async : false,
            success : function(data){
                if(!data.success){
                    flag = false;
                    //tip(data.msg);
                    top.window.tip(data.msg);
                }else{
                    top.window.tip(data.msg);
                    //隐藏标签
                    $("#"+id+"").remove();
                }
            }
        });
    }
    function Temporary() {
        submit("0");
    }
    function submit(status) {
        var fileName2 = $("#fileName2").text();
        if(fileName2 == "" || fileName2 == null){
            tip("请上传诊断包");
            return;
        }
        var fileName4 = $("#fileName4").text();
        if(fileName4 == "" || fileName4 == null){
            tip("请上传现场照片");
            return;
        }
        //调用formValidata 进行验证，并能阻止提交
        if(!form.check(false)){
            form.submitForm(false);
            var a = $("input:focus").attr("id");
            $("html,body").animate({scrollTop:$("#"+a).offset().top+(-100)+"px"},"fast");
            return;
        }
        var obj = {};
        var finishFiles=[];
        var m=0;
        $("[name='finishFile']").each(function (){
            finishFiles[m]=$(this).attr("id");
            m++;
        });
        var repairFiles=[];
        var s=0;
        $("[name='repairFile']").each(function (){
            repairFiles[s]=$(this).attr("id");
            s++;
        });
        var rectificationFiles=[];
        var x=0;
        $("[name='rectificationFile']").each(function (){
            rectificationFiles[x]=$(this).attr("id");
            x++;
        });
        var photoFiles=[];
        var u=0;
        $("[name='photoFile']").each(function (){
            photoFiles[u]=$(this).attr("id");
            u++;
        });
        var equipmentType = $('#equipmentType').combotree('tree').tree('getSelected');
        obj.id=$("#id").val();
        obj.serviceId=$("#cbsServiceId").val();
        obj.finishFiles=finishFiles;
        obj.repairFiles=repairFiles;
        obj.rectificationFiles=rectificationFiles;
        obj.photoFiles=photoFiles;
        obj.sceneTota=$("#sceneTota").val();
        obj.orderTime=$("#orderTime").val();
        obj.actualTime=$("#actualTime").val();
        obj.finishTime=$("#finishTime").val();
        obj.cinemaName=$("#cinemaName").val();
        obj.sheng=$("#sheng").val();
        obj.shi=$("#shi").val();
        obj.address=$("#address").val();
        obj.contactsName=$("#contactsName").val();
        obj.phone=$("#phone").val();
        obj.sn=$("#sn").val();
        if(equipmentType!=null && equipmentType!=""){
            obj.equipmentType=equipmentType.id;
        }
        obj.wd=$("#wd").val();
        obj.sd=$("#sd").val();
        obj.srdy=$("#srdy").val();
        obj.lddy=$("#lddy").val();
        obj.fc=$("#fc").val();
        obj.pffs=$("#pffs").val();
        obj.icmp=$("#icmp").val();
        obj.jgReform=$("#jgReform").val();
        obj.gypp=$("#gypp").val();
        obj.ycDes=$("#ycDes").val();
        obj.photoType=$("#photoType").val();
        /*obj.assignDes=$("#assignDes").val();*/
        obj.a1=$("#a1").val();
        obj.a2=$("#a2").val();
        obj.a3=$("#a3").val();
        obj.a4=$("#a4").val();
        obj.a5=$("#a5").val();
        obj.a6=$("#a6").val();
        obj.a7=$("#a7").val();
        obj.a8=$("#a8").val();
        obj.a9=$("#a9").val();
        obj.a10=$("#id10").val();
        obj.a11=$("#id11").val();
        obj.a12=$("#id12").val();
        obj.a13=$("#id13").val();
        obj.a14=$("#id14").val();
        obj.a15=$("#id15").val();
        obj.a16=$("#id16").val();
        obj.a17=$("#id17").val();
        obj.a18=$("#id18").val();
        obj.a19=$("#id19").val();
        obj.a20=$("#id20").val();
        obj.a21=$("#id21").val();
        obj.a22=$("#id22").val();
        obj.a23=$("#id23").val();
        obj.a24=$("#id24").val();
        obj.a25=$("#id25").val();
        obj.a26=$("#id26").val();
        obj.a27=$("#id27").val();
        obj.a28=$("#id28").val();
        obj.a29=$("#id29").val();
        obj.a30=$("#id30").val();
        obj.a31=$("#id31").val();
        obj.a32=$("#id32").val();
        obj.a33=$("#id33").val();
        if(status==null){
            obj.status=1;
        }else{
            obj.status=status;
        }

        obj.type = $("#type").val();
        obj.editReport = '${editReport}';
        var cbserviceId = $("#cbsServiceId").val();
        $.ajax({
            url : "cbsServiceReportController.do?addSceneCheckReport",
            data : obj,
            cache : false,
            dataType : 'json',
            type : 'POST',
            async : false,
            traditional:true,
            success : function(data){
                if(data.success){
                    if(data.msg==0){
                        tip("暂存成功！");
                        var type = $("#type").val();
                        if (type == 2) {
                            addOneTab("服务单管理", "cbsServiceController.do?cbsService");
                            setTimeout("closetab('现场检测完工单')", 1000);
                        } else {
                            addOneTab("我的任务", "cbsServiceAssignListController.do?engineerlists&code=1");
                            setTimeout("closetab('服务订单详情')", 1000);
                            setTimeout("closetab('现场检测完工单')", 1000);
                        }
                    }else{
                        tip("提交成功！");
                        $.ajax({
                            type: "post",
                            data: {"id": cbserviceId},
                            url: "cbsServiceReportController.do?getRole",
                            dataType: "json",
                            success: function (data) {
                                var rData = data.attributes;
                                if (rData != null) {
                                    var role = rData.role;
                                    jQuery.messager.confirm('提示:', '是否提交返件申请?', function (event) {
                                        if (event) {
                                            if (role == "EG" || role == "AEG" || role == "barcoCSE") {
                                                addOneTab("待返件任务", "cbsReturnEquipmentController.do?cbsReturnEquipmentGCS");
                                                setTimeout("closetab('现场检测完工单')", 1000);
                                            }
                                            if (role == "HD") {
                                                addOneTab("返件管理", "cbsReturnEquipmentController.do?cbsReturnEquipmentCSA");
                                                setTimeout("closetab('现场检测完工单')", 1000);
                                            }
                                            //TODO  打开该服务单的返件申请列表页

                                        } else {
                                            var type = $("#type").val();
                                            if (type == 2) {
                                                addOneTab("服务单管理", "cbsServiceController.do?cbsService");
                                                setTimeout("closetab('现场检测完工单')", 1000);
                                            } else {
                                                addOneTab("我的任务", "cbsServiceAssignListController.do?engineerlists&code=1");
                                                setTimeout("closetab('服务订单详情')", 1000);
                                                setTimeout("closetab('现场检测完工单')", 1000);
                                            }
                                        }
                                    });
                                } else {
                                    var type = $("#type").val();
                                    if (type == 2) {
                                        addOneTab("服务单管理", "cbsServiceController.do?cbsService");
                                        setTimeout("closetab('现场检测完工单')", 1000);
                                    } else {
                                        addOneTab("我的任务", "cbsServiceAssignListController.do?engineerlists&code=1");
                                        setTimeout("closetab('服务订单详情')", 1000);
                                        setTimeout("closetab('现场检测完工单')", 1000);
                                    }
                                }
                            }
                        })
                    }
                }else{
                    tip(data.msg);
                }
            }
        });
    }
    function getShi() {
        var sheng=$("#sheng").val();
        $.ajax({
            url: "cbsServiceController.do?getShi",
            data: {
                "sheng":sheng,
            },
            cache: false,
            dataType: 'json',
            type: 'POST',
            error : function() {// 请求失败处理函数
            },
            success : function(data) {
                $("#shi").html("");
                var html="";
                for(var i=0;i<data.length;i++){
                    html+="<option value='"+data[i].territoryCode+"'>"+data[i].territoryName+"</option>"
                }
                $("#shi").append(html);
                var shi = $("#shi").find("option");
                var city=$("#city").val();
                for (var j = 0; j < shi.length; j++) {
                    if ($(shi[j]).val() ==city) {
                        $(shi[j]).attr("selected", "selected");
                    }
                }
            }
        });
    }
    $(function(){
            form=$("#formobj").Validform({
            ignoreHidden:true,
            postonce:true,
            showAllError : true,
            ajaxPost:true,
            tiptype:3,
        })
        getShi();
    })
</script>
<body>
<t:formvalid layout="" dialog="false" formid="formobj" >
<div style="margin-bottom:10px;">
    <div style="text-align: center; width: 100%; ">
        <c:if test="${!editReport}">
            <a href="#" class="easyui-linkbutton l-btn" onclick="Temporary()">暂存</a>
        </c:if>
        <a href="#" class="easyui-linkbutton l-btn" onclick="submit(null)">提交</a>
    </div>
</div>
<div class="subtitle">
    <p>完工报告</p>
    <input type="hidden" id="type" value="${type}" name="type"/>
    <input type="hidden" id="cbsServiceId" value="${cbsServiceEntity.id}"/>
    <table class="nobordertable noborder">
        <tbody>
        <tr>
            <td class="al_r" width="20%">
                <span style="color: red">*</span><label>预计上门时间:</label>
            </td>
            <td width="30%">
                <input readonly="readonly" name="orderTime" id="orderTime" value="<fmt:formatDate value="${cbsServiceEntity.orderTime}" type="date" pattern="yyyy-MM-dd"/>"/>
               <%-- <fmt:formatDate value="${cbsServiceEntity.orderTime}" pattern="yyyy-MM-dd"></fmt:formatDate>--%>
            </td>
            <td class="al_r" width="20%">
                <span style="color: red">*</span><label>实际上门时间:</label>
            </td>
            <td width="30%">
                <c:if test="${cbsSceneCheckReportHql==null}">
                    <input onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="Wdate" name="actualTime" id="actualTime" value="<fmt:formatDate value='${dateList}' type="date" pattern="yyyy-MM-dd HH:mm:ss"/>" datatype="*" nullmsg="请填写实际上门时间"/>
                </c:if>
                <c:if test="${cbsSceneCheckReportHql!=null}">
                    <input onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="Wdate" name="actualTime" id="actualTime" value="<fmt:formatDate value='${cbsSceneCheckReportHql.actualTime}' type="date" pattern="yyyy-MM-dd HH:mm:ss"/>" datatype="*" nullmsg="请填写实际上门时间"/>
                </c:if>
            </td>
        </tr>
        <tr>
            <td class="al_r" width="20%">
                <label>上门次数:</label>
            </td>
            <td width="30%">
                <input  type="hidden" value="${signNumbers}" name="sceneTotal" id="sceneTotal">${signNumbers}
            </td>
            <td class="al_r" width="20%">
                <span style="color: red">*</span><label>服务完工时间:</label>
            </td>
            <td width="30%">
                <c:if test="${cbsSceneCheckReportHql==null}">
                    <input onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="Wdate" name="finishTime" id="finishTime" value="<fmt:formatDate value='${cbsServiceEntity.closeTime}' type="date" pattern="yyyy-MM-dd HH:mm:ss"/>" datatype="*" nullmsg="请填写实际上门时间"/>
                </c:if>
                <c:if test="${cbsSceneCheckReportHql!=null}">
                    <input onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="Wdate" name="finishTime" id="finishTime" value="<fmt:formatDate value='${cbsSceneCheckReportHql.finishTime}' type="date" pattern="yyyy-MM-dd HH:mm:ss"/>" datatype="*" nullmsg="请填写实际上门时间"/>
                </c:if>
            </td>
        </tr>
        <tr>
            <td class="al_r" width="20%" valign="top">
                <span style="color: red">*</span><label>影院名称:</label>
            </td>
            <td width="30%" valign="top">
                <c:if test="${cbsSceneCheckReportHql==null}">
                    <input name="cinemaName" style="width: 300px" id="cinemaName" value="${cbsServiceEntity.zyCinemaName}" datatype="*"/>
                    <span class="Validform_checktip"></span>
                    <label class="Validform_label" style="display: none;">影院名称</label>
                </c:if>
                <c:if test="${cbsSceneCheckReportHql!=null}">
                    <input name="cinemaName" style="width: 300px" id="cinemaName" value="${cbsSceneCheckReportHql.cinemaName}" datatype="*"/>
                    <span class="Validform_checktip"></span>
                    <label class="Validform_label" style="display: none;">影院名称</label>
                </c:if>
            </td>
            <td class="al_r" width="20%" valign="top">
                <span style="color: red">*</span><label>影院地址:</label>
            </td>
            <td width="30%" valign="top">
                <select style="width:100px" name="sheng" id="sheng" onchange="getCity()">
                    <c:forEach items="${territoryList}" var="terry">
                        <option <c:if test="${cbsSceneCheckReportHql==null}"><c:if test="${cbsServiceEntity.province.territoryName == terry.territoryName}">selected="selected"</c:if></c:if> <c:if test="${cbsSceneCheckReportHql!=null}"><c:if test="${cbsSceneCheckReportHql.sheng == terry.territoryCode}">selected="selected"</c:if></c:if> value="${terry.territoryCode}">${terry.territoryName}</option>
                    </c:forEach>
                </select>
                <c:if test="${cbsSceneCheckReportHql==null}">
                    <input type="hidden" id="city" value="${cbsServiceEntity.city.territoryCode}">
                </c:if>
                <c:if test="${cbsSceneCheckReportHql!=null}">
                    <input type="hidden" id="city" value="${cbsSceneCheckReportHql.shi}">
                </c:if>
                <select style="width:100px" id="shi" name="shi">
                    <%--<c:forEach items="${shiList}" var="terry">
                        <option <c:if test="${cbsSceneCheckReportHql==null}"><c:if test="${cbsServiceEntity.city.territoryName == terry.territoryName}">selected="selected"</c:if></c:if> <c:if test="${cbsSceneCheckReportHql!=null}"><c:if test="${cbsSceneCheckReportHql.shi == terry.territoryCode}">selected="selected"</c:if></c:if> value="${terry.territoryCode}">${terry.territoryName}</option>
                    </c:forEach>--%>
                </select></br>
                <c:if test="${cbsSceneCheckReportHql==null}">
                    <input name="address" style="width: 300px" id="address" value="${cbsServiceEntity.address}" datatype="*" nullmsg="请填写具体地址"/>
                </c:if>
                <c:if test="${cbsSceneCheckReportHql!=null}">
                    <input name="address" style="width: 300px" id="address" value="${cbsSceneCheckReportHql.address}" datatype="*" nullmsg="请填写具体地址"/>
                </c:if>
            </td>
        </tr>
        <%--<tr>
            <td class="al_r" width="20%">

            </td>
            <td width="30%">

            </td>
        </tr>--%>
        <tr>
            <td class="al_r" width="20%">
                <span style="color: red">*</span><label>联系人:</label>
            </td>
            <td width="30%">
                <c:if test="${cbsSceneCheckReportHql==null}">
                    <input name="contactsName" id="contactsName" value="${mapList.name}" datatype="*" nullmsg="请填写联系人"/>
                </c:if>
                <c:if test="${cbsSceneCheckReportHql!=null}">
                    <input name="contactsName" id="contactsName" value="${cbsSceneCheckReportHql.contactsName}" datatype="*" nullmsg="请填写联系人"/>
                </c:if>
            </td>
            <td class="al_r" width="20%">
                <span style="color: red">*</span><label>电话:</label>
            </td>
            <td width="30%">
                <c:if test="${cbsSceneCheckReportHql==null}">
                    <input name="phone" id="phone" value="${mapList.contactsphone}" datatype="*" nullmsg="请填写电话"/>
                </c:if>
                <c:if test="${cbsSceneCheckReportHql!=null}">
                    <input name="phone" id="phone" value="${cbsSceneCheckReportHql.phone}" datatype="*" nullmsg="请填写电话"/>
                </c:if>
            </td>
        </tr>
        <tr>
            <td class="al_r" width="20%">
                <span style="color: red">*</span><label>放映机序列号:</label>
            </td>
            <td width="30%">
                <c:if test="${cbsSceneCheckReportHql==null}">
                    <input name="sn" id="sn" value="${cbsServiceEntity.sn}" datatype="*" nullmsg="放映机序列号"/>
                </c:if>
                <c:if test="${cbsSceneCheckReportHql!=null}">
                    <input name="sn" id="sn" value="${cbsSceneCheckReportHql.sn}" datatype="*" nullmsg="放映机序列号"/>
                </c:if>
            </td>
            <td class="al_r" width="20%">
                <label>放映机型号:</label>
            </td>
            <td width="30%">
                <%--<select>
                    <option>${cbsServiceEntity.zyEquipmentSpareId.item}</option>
                </select>--%>
                <c:if test="${cbsSceneCheckReportHql==null}">
                    <input name="equipmentType" id="equipmentType" value="${cbsServiceEntity.zyEquipmentSpareId.type.id}"/>
                </c:if>
                <c:if test="${cbsSceneCheckReportHql!=null}">
                    <input name="equipmentType" id="equipmentType" value="${cbsSceneCheckReportHql.equipmentType}"/>
                </c:if>
            </td>
        </tr>
        <tr>
            <td class="al_r" width="20%">
                <label>派单要求:</label>
            </td>
            <td colspan="3">
                <c:if test="${cbsSceneCheckReportHql!=null}">
                    <%--<input id="assignDes" name="assignDes" value="${cbsSceneCheckReportHql.assignDes}"/>--%>${cbsSceneCheckReportHql.assignDes}
                </c:if>
                <c:if test="${cbsSceneCheckReportHql==null}">
                    <%--<input id="assignDes" name="assignDes" value="${serviceAssign.assign_des}">--%>${serviceAssign.assign_des}
                </c:if>
                <%--<input name="assignDes" id="assignDes" value="${cbsSceneCheckReportHql.assignDes}"/>--%>
            </td>
        </tr>
        </tbody>
    </table>
    <div class="line"></div>
    <table class="nobordertable noborder">
        <tbody>
        <tr>
            <td class="al_r" width="20%">
                <label>完工单附件:</label>
            </td>
            <td width="30%">
                <input type="hidden" name="id" id="id" value="${cbsSceneCheckReportHql.id}">
                <input type="file" id="fileUpload1"/><span id="fileName1"></span>
                <c:if test="${zyFileLogEntityF1Hql!=null}">
                    <c:forEach items="${zyFileLogEntityF1Hql}" var="f1">
                        <p id="${f1.id}" name="finishFile" style="background-color: white"><span class="color-blue">${f1.oldFileName}</span>&nbsp;&nbsp;<a style="cursor: pointer;" onclick="delFile('${f1.id}')">[删除]</a></p>
                    </c:forEach>
                </c:if>
            </td>
            <td class="al_r" width="20%">
                <span style="color: red">*</span><label>诊断包:</label>
            </td>
            <td width="30%">
                <input type="file" id="fileUpload2"/>
                <span id="fileName2">
                <c:if test="${zyFileLogEntityF2Hql!=null}">
                    <c:forEach items="${zyFileLogEntityF2Hql}" var="f2">
                        <p id="${f2.id}" name="repairFile" style="background-color: white"><span class="color-blue">${f2.oldFileName}</span>&nbsp;&nbsp;<a style="cursor: pointer;" onclick="delFile('${f2.id}')">[删除]</a></p>
                    </c:forEach>
                </c:if>
                </span>
            </td>
        </tr>
        <tr>
            <td class="al_r" width="20%">
                <label>整改函:</label>
            </td>
            <td colspan="3">

                <input type="file" id="fileUpload3"/>
                <span id="fileName3">
                <c:if test="${zyFileLogEntityF3Hql!=null}">
                    <c:forEach items="${zyFileLogEntityF3Hql}" var="f3">
                        <p id="${f3.id}" name="rectificationFile" style="background-color: white"><span class="color-blue">${f3.oldFileName}</span>&nbsp;&nbsp;<a style="cursor: pointer;" onclick="delFile('${f3.id}')">[删除]</a></p>
                    </c:forEach>
                </c:if>
                </span>
            </td>
        </tr>
        <tr>
            <td class="al_r" width="20%">
                <label>现场照片:</label>
            </td>
            <td colspan="3">
                <select style="width: auto;" name="photoType" id="photoType">
                    <option value="全黑测试图照片" ${cbsSceneCheckReportHql.photoType=='全黑测试图照片'?"selected":""}>全黑测试图照片</option>
                    <option value="全白测试图照片" ${cbsSceneCheckReportHql.photoType=='全白测试图照片'?"selected":""}>全白测试图照片</option>
                    <option value="三原色（红）测试" ${cbsSceneCheckReportHql.photoType=='三原色（红）测试'?"selected":""}>三原色（红）测试</option>
                    <option value="三原色（绿）测试" ${cbsSceneCheckReportHql.photoType=='三原色（绿）测试'?"selected":""}>三原色（绿）测试</option>
                    <option value="三原色（蓝）测试" ${cbsSceneCheckReportHql.photoType=='三原色（蓝）测试'?"selected":""}>三原色（蓝）测试</option>
                    <option value="汇聚测试图照片" ${cbsSceneCheckReportHql.photoType=='汇聚测试图照片'?"selected":""}>汇聚测试图照片</option>
                    <option value="绿聚焦测试图照片" ${cbsSceneCheckReportHql.photoType=='绿聚焦测试图照片'?"selected":""}>绿聚焦测试图照片</option>
                    <option value="其他" ${cbsSceneCheckReportHql.photoType=='其他'?"selected":""}>其他</option>
                    <option value="棱镜照片" ${cbsSceneCheckReportHql.photoType=='棱镜照片'?"selected":""}>棱镜照片</option>
                    <option value="异常照片" ${cbsSceneCheckReportHql.photoType=='异常照片'?"selected":""}>异常照片</option>
                    <option value="LPS照片" ${cbsSceneCheckReportHql.photoType=='LPS照片'?"selected":""}>LPS照片</option>
                    <option value="引擎照片" ${cbsSceneCheckReportHql.photoType=='引擎照片'?"selected":""}>引擎照片</option>
                    <option value="ICP照片" ${cbsSceneCheckReportHql.photoType=='ICP照片'?"selected":""}>ICP照片</option>
                    <option value="解码板照片" ${cbsSceneCheckReportHql.photoType=='解码板照片'?"selected":""}>解码板照片</option>
                    <option value="SMPS照片" ${cbsSceneCheckReportHql.photoType=='SMPS照片'?"selected":""}>SMPS照片</option>
                    <option value="触摸屏照片" ${cbsSceneCheckReportHql.photoType=='触摸屏照片'?"selected":""}>触摸屏照片</option>
                    <option value="ICMP照片" ${cbsSceneCheckReportHql.photoType=='ICMP照片'?"selected":""}>ICMP照片</option>
                    <option value="控制板照片" ${cbsSceneCheckReportHql.photoType=='控制板照片'?"selected":""}>控制板照片</option>
                </select>
                <input type="file" id="fileUpload4"/><div style="width: 800px;" id="fileName4">
                    <c:if test="${zyFileLogEntityF4Hql!=null}">
                        <c:forEach items="${zyFileLogEntityF4Hql}" var="f4" varStatus="status">
                            <p id="${f4.id}" style="background-color: white"><span name="photoFile" class="color-blue">${f4.oldFileName}</span>&nbsp;&nbsp;<a style="cursor: pointer;" onclick="delFile('${f4.id}')">[删除]</a></p><c:if test="${status.count%4==0}"><br/></c:if>
                        </c:forEach>
                    </c:if>
                </div>
            </td>
        </tr>
        <tr>
            <td class="al_r" width="20%">

            </td>
            <td colspan="3">
                <span class="color-org">提示：</span>
                <span class="color-hui">以上测试图照片需在无遮掩状态下拍照完整画面，并且聚焦清晰。
如有异常需增加细节照片，并在整体照片中圈画出异常位置。</span>
            </td>
        </tr>
        </tbody>
    </table>
    <div class="line"></div>
    <div style="text-align: center; font-weight: bold;font-size:17px;">现场信息记录</div>
    <div><span style="font-weight: bold;">环境监测</span></div>
    <table class="nobordertable noborder">
        <tbody>
        <tr>
            <td class="al_r" width="20%">
                <span style="color: red">*</span><label>温度:</label>
            </td>
            <td width="30%">
                <input name="wd" id="wd" value="${cbsSceneCheckReportHql.wd}" datatype="/^((((-(20|1\d|[1-9]))|\d|[1-4]\d)(\.\d)?)|(50(\.0)?))$/" nullmsg="请填写温度" errormsg="请输入-20到50并且小数位是1位的数值！"/>
            </td>
            <td class="al_r" width="20%">
                <span style="color: red">*</span><label>湿度:</label>
            </td>
            <td width="30%">
                <input name="sd" id="sd" value="${cbsSceneCheckReportHql.sd}" datatype="*"/>
                <span class="Validform_checktip"></span>
                <label class="Validform_label" style="display: none;">湿度</label>
            </td>
        </tr>
        <tr>
            <td class="al_r" width="20%">
                <span style="color: red">*</span><label>输入电压:</label>
            </td>
            <td width="30%">
                <input name="srdy" id="srdy" value="${cbsSceneCheckReportHql.srdy}" datatype="/^(((\d|[1-9]\d|[1-4]\d\d)(\.\d)?)|(500(\.0)?))$/" nullmsg="请输入输入电压" errormsg="请输入0到500并且小数位是1位的数值！"/>
                <span class="Validform_checktip"></span>
                <label class="Validform_label" style="display: none;">输入电压</label>
            </td>
            <td class="al_r" width="20%">
                <span style="color: red">*</span><label>零地电压:</label>
            </td>
            <td width="30%">
                <input name="lddy" id="lddy" value="${cbsSceneCheckReportHql.lddy}" datatype="/^(((\d|[1-2]\d)(\.\d)?)|(30(\.0)?))$/" nullmsg="请填写零地电压" errormsg="请输入0到30并且小数位是1位的数值！"/>
                <span class="Validform_checktip"></span>
                <label class="Validform_label" style="display: none;">零地电压</label>
            </td>
        </tr>
        <tr>
            <td class="al_r" width="20%">
                <label>粉尘:</label>
            </td>
            <td width="30%">
                <input name="fc" id="fc" value="${cbsSceneCheckReportHql.fc}"/>
            </td>
            <td class="al_r" width="20%">
                <label>排风风速:</label>
            </td>
            <td width="30%">
                <input name="pffs" id="pffs" value="${cbsSceneCheckReportHql.pffs}"/>
            </td>
        </tr>
        </tbody>
    </table>
    <div class="line"></div>
    <div><span style="font-weight: bold;">设备检查</span></div>
    <table class="nobordertable noborder">
        <tbody>
        <tr>
            <td class="al_r" width="20%">
                <span style="color: red">*</span><label>是否ICMP:</label>
            </td>
            <td width="30%">
                <select name="icmp" id="icmp">
                    <option value="0" ${cbsSceneCheckReportHql.icmp==0?"selected":""}>否</option>
                    <option value="1" ${cbsSceneCheckReportHql.icmp==1?"selected":""}>是</option>
                </select>
            </td>
            <td class="al_r" width="20%">
                <span style="color: red">*</span><label>激光改造类型:</label>
            </td>
            <td width="30%">
                <select name="jgReform" id="jgReform">
                    <option value="0" ${cbsSceneCheckReportHql.jgReform==0?"selected":""}>未光改</option>
                    <option value="1" ${cbsSceneCheckReportHql.jgReform==1?"selected":""}>光峰光改</option>
                    <option value="2" ${cbsSceneCheckReportHql.jgReform==2?"selected":""}>LP光改</option>
                </select>
            </td>
        </tr>
        <tr>
            <td class="al_r" width="20%">
                <span style="color: red">*</span><label>光源品牌:</label>
            </td>
            <td width="30%">
                <select style="width:auto;" name="gypp" id="gypp" <%--defaultVal='${cbsContractPage.inspectionType}'--%>>
                    <option value="1" ${cbsSceneCheckReportHql.gypp==1?"selected":""}>OSRAM</option>
                    <option value="2" ${cbsSceneCheckReportHql.gypp==2?"selected":""}>光峰</option>
                    <option value="3" ${cbsSceneCheckReportHql.gypp==3?"selected":""}>巴可</option>
                    <option value="4" ${cbsSceneCheckReportHql.gypp==4?"selected":""}>USHIO</option>
                    <option value="5" ${cbsSceneCheckReportHql.gypp==5?"selected":""}>其他</option>
                </select>
            </td>
            <td class="al_r" width="20%">

            </td>
            <td width="30%">

            </td>
        </tr>
        <tr>
            <td class="al_r" width="20%" valign="top">
                <label>异常说明:</label>
            </td>
            <td colspan="3">
                <span class="color-red">现场如有异常或存在其他问题，请在下方做详细描述，并拍照片反馈巴可，同时立即告知影院</span>
                <textarea style="width: 100%; height: 60px;" name="ycDes" id="ycDes">${cbsSceneCheckReportHql.ycDes}</textarea>
            </td>
        </tr>
        </tbody>
    </table>
    <div class="line"></div>
    <div><span style="font-weight: bold;">关键备件序列号</span></div>
    <table class="ftable" style="margin-top:10px;">
        <tr>
            <th>备件名称</th>
            <th>序列号</th>
            <th>二维码</th>
            <th>异常说明</th>
        </tr>
        <tr>
        <tr>
            <td>引擎</td>
            <td><input name="a1" id="a1" value="${cbsSceneCheckReportHql.a1}" datatype="*" nullmsg="请填写引擎序列号"/></td>
            <td><input name="a2" id="a2" value="${cbsSceneCheckReportHql.a2}" datatype="*" nullmsg="请填写引擎二维码"/></td>
            <td><input name="a3" id="a3" value="${cbsSceneCheckReportHql.a3}"/></td>
        </tr>
            <td>TI/ICP（未使用不填）</td>
            <td><input name="a4" id="a4" value="${cbsSceneCheckReportHql.a4}"/></td>
            <td><input name="a5" id="a5" value="${cbsSceneCheckReportHql.a5}"/></td>
            <td><input name="a6" id="a6" value="${cbsSceneCheckReportHql.a6}"/></td>
        </tr>
        <tr>
            <td>ICMP（未使用不填）</td>
            <td><input name="a7" id="a7" value="${cbsSceneCheckReportHql.a7}"/></td>
            <td><input name="a8" id="a8" value="${cbsSceneCheckReportHql.a8}"/></td>
            <td><input name="a9" id="a9" value="${cbsSceneCheckReportHql.a9}"/></td>
        </tr>
        <tr>
            <td>解码板（未使用不填）</td>
            <td><input name="a10" id="id10" value="${cbsSceneCheckReportHql.a10}"/></td>
            <td><input name="a11" id="id11" value="${cbsSceneCheckReportHql.a11}"/></td>
            <td><input name="a12" id="id12" value="${cbsSceneCheckReportHql.a12}"/></td>
        </tr>
        <tr>
            <td>SMPS</td>
            <td><input name="a13" id="id13" value="${cbsSceneCheckReportHql.a13}" datatype="*"/></td>
            <td><input name="a14" id="id14" value="${cbsSceneCheckReportHql.a14}" datatype="*"/></td>
            <td><input name="a15" id="id15" value="${cbsSceneCheckReportHql.a15}"/></td>
        </tr>
        <tr>
            <td>控制板</td>
            <td><input name="a19" id="id19" value="${cbsSceneCheckReportHql.a19}" datatype="*"/></td>
            <td><input name="a20" id="id20" value="${cbsSceneCheckReportHql.a20}" datatype="*"/></td>
            <td><input name="a21" id="id21" value="${cbsSceneCheckReportHql.a21}"/></td>
        </tr>
        <tr>
            <td>LPS（光改不填）</td>
            <td><input name="a22" id="id22" value="${cbsSceneCheckReportHql.a22}" style="width: 33%;margin-right: 1px"/><input name="a23" id="id23" value="${cbsSceneCheckReportHql.a23}" style="width: 33%;margin-right: 1px"/><input name="a24" id="id24" value="${cbsSceneCheckReportHql.a24}" style="width: 33%;margin-right: 1px"/></td>
            <td><input name="a25" id="id25" value="${cbsSceneCheckReportHql.a25}" style="width: 33%;margin-right: 1px"/><input name="a26" id="id26" value="${cbsSceneCheckReportHql.a26}" style="width: 33%;margin-right: 1px"/><input name="a27" id="id27" value="${cbsSceneCheckReportHql.a27}" style="width: 33%;margin-right: 1px"/></td>
            <td><input name="a28" id="id28" value="${cbsSceneCheckReportHql.a28}"/></td>
        </tr>
        <tr>
            <td>触摸屏（未使用不填）</td>
            <td><input name="a31" id="id31" value="${cbsSceneCheckReportHql.a31}"/></td>
            <td><input name="a32" id="id32" value="${cbsSceneCheckReportHql.a32}"/></td>
            <td><input name="a33" id="id33" value="${cbsSceneCheckReportHql.a33}"/></td>
        </tr>
    </table>
</div>
</t:formvalid>
</body>
</html>
